<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
        <title><?php echo $title_for_layout; ?></title>
        <meta name="description" content=""></meta>
        <meta name="keywords" content=""></meta>
        <meta name="robots" content="index,follow"></meta>

        <?php
        echo $this->Html->meta('icon');
        echo $this->Html->css(array('style', 'style_003', 'clickmenu/jquerycssmenu', 'style_002'));
        echo $this->Javascript->link(array('jquery-1.5.1.min', 'clickmenu/jquerycssmenu'));
        //echo $this->Javascript->link(array('jquery-1', 'jquery-ui-1', 'hoverIntent', 'superfish', 'excanvas', 'jquery', 'jquery_002', 'set', 'custom'));


        echo $scripts_for_layout;
        ?>

        <!--[if IE 7]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
        <!--[if IE 6]><link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen, projection" /><![endif]-->

        <!--[if IE]>
                <style type="text/css">
  .clearfix {
    zoom: 1;     /* triggers hasLayout */
    display: block;     /* resets display for IE/Win */
    }  /* Only IE can see inside the conditional comment
    and read this CSS rule. Don't ever use a normal HTML
    comment inside the CC or it will close prematurely. */
</style>
<![endif]-->



<!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->
        
    </head>
    <body>
        <div class="container" id="container">
            <div class="noprint" id="header">
                <div id="profile_info">

                    <p>Welcome <strong><?php echo $access->isLoggedIn() ? $access->getmy('username') : 'Guest'; ?></strong> | 
                        <?php
                        echo $this->Html->link('Log out', array('controller' => 'users', 'action' => 'logout'));
                        //echo "<br>".$this->element('admin_points');
                        ?></p>
                    <?php if (!$access->check('User')) { ?>
                        <p>You have <span style="font-size: 16px;color:#000;"><?php if (isset($_SESSION['points']))
                            echo $_SESSION['points'];else
                            echo "0"; ?></span> points </p>
<?php } ?>

                </div>
                <div id="logo"><?php echo $this->Html->link($this->Html->image('admin_logo.png', array('alt' => 'Logo')), array('controller' => 'Homes', 'action' => 'index', 'admin' => false), array('escape' => false, 'target' => "_blank")); ?></div>

            </div><!-- end header -->
            <div id="content" style="width:1050px;" >
                <span class="noprint"><!-- Added for printing purpose.-->
                    <div id="myjquerymenu" class="jquerycssmenu clearfix noprint">
                        <ul > <!-- DROPDOWN MENU -->
                            <li >
                                <a  href="#">Content Management</a><!-- First level MENU -->
                                <ul >
                                    <?php if ($access->check('Adjective')): ?>
                                    <li> <a href="#">Adjectives</a>
                                        <ul>
                                      <li>
                                            <?php echo $this->Html->link('Adjectives', array('controller' => 'Adjectives', 'action' => 'index')); ?>
                                     </li>
                                     <li>
                                            <?php echo $this->Html->link('Suggested Adjectives', array('controller' => 'Adjectives', 'action' => 'suggested')); ?>
                                     </li>
                                            </ul>    
                                    </li>
                                    <?php endif;
                                    if ($access->check('Tag')): ?>
                                        <li>
    <?php echo $this->Html->link('Tags', array('controller' => 'Tags', 'action' => 'index')); ?>
                                        </li>
<?php endif; ?>
                                    <li >
                                        <a href="#">Subject</a>
                                        <ul>
                                            <li ><?php if ($access->check('Subject', 'create')): echo $this->Html->link('Add Subjects', array('controller' => 'Subjects', 'action' => 'add'));
endif; ?></li>
                                            <li ><?php echo $this->Html->link('New Subjects', array('controller' => 'Subjects', 'action' => 'index', 'status' => '0')); ?></li>
                                            <li ><?php echo $this->Html->link('Approved Subjects', array('controller' => 'Subjects', 'action' => 'index', 'status' => '1')); ?></li>
                                            <li><?php echo $this->Html->link('Flagged Subjects', array('controller' => 'Subjects', 'action' => 'flagged')); ?></li>
                                        </ul>
                                    </li>


                                </ul>
                            </li>
<?php if ($access->check('Tag')): ?>
                                <li  > <a class="sf-with-ul" href="#">Users</a>
                                    <ul>
                                        <li ><a href="#">Moderators</a>
                                            <ul>
                                                <li><?php echo $this->Html->link('View Moderators', array('controller' => 'Users', 'action' => 'moderators')); ?></li>


                                                <li ><?php echo $this->Html->link('Add Moderator', array('controller' => 'Users', 'action' => 'register')); ?></li>
                                                <li><?php //$this->Html->link('Moderator Permissions',array('controller'=>'Users','action'=>'permissions')); ?></li>
                                            </ul>
                                        </li>
                                        <li ><a href="#">Users</a>
                                            <ul>
                                                <li><?php echo $this->Html->link('New', array('controller' => 'Users', 'action' => 'index', 'status' => '0')); ?></li>


                                                <li ><?php echo $this->Html->link('Approved', array('controller' => 'Users', 'action' => 'index', 'status' => '1')); ?></li>
                                                <li><?php //$this->Html->link('Flagged',array('controller'=>'Users','action'=>'permissions')); ?></li>
                                            </ul>
                                        </li>

                                    </ul>
                                </li>
<?php endif; ?>
                            <li><?php echo $this->Html->link('Personal Setting', array('controller' => 'Moderators', 'action' => 'profile')) ?></li>
                            <li><?php if ($access->check('Tag')): echo $this->Html->link('Email Templates', array('controller' => 'Templates', 'action' => 'index'));endif; ?></li>    
                        <li><?php if ($access->check('Tag')): echo $this->Html->link('Profile Fields', array('controller' => 'Profilefields', 'action' => 'index'));endif; ?></li>
                        <li><?php if ($access->check('Tag')): echo $this->Html->link('Static Pages', array('controller' => 'Staticpages', 'action' => 'index'));endif; ?></li>
			<li><?php if ($access->check('Tag')): echo $this->Html->link('Home Panel', array('controller' => 'homes', 'action' => 'facts'));endif; ?></li>
                        <li><?php if ($access->check('Tag')): echo $this->Html->link('Member Plans', array('controller' => 'memberplans', 'action' => 'index'));endif; ?></li>
                        
                        </ul>

                    </div></span>
                <div id="content_main" class="clearfix">
<?php if ($this->Session->check('Message.flash')) {
    echo"<div class='success'>" . $this->Session->flash() . "</div>";
} ?>
<?php echo $content_for_layout; ?>

                    <div style="margin:40px 0 40px 0;" class="noprint"><hr></hr></div>
<?php //echo $this->element('sql_dump'); ?>
                </div>
            </div><!-- end #content_main -->
        </div>
    </body>
</html>
